# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kmail-account-wizard
pkgver=20.04.3
pkgrel=0
arch="all !ppc64le !s390x !armhf !mips !mips64" # Limited by kmailtransport -> libkgapi -> qt5-qtwebengine
url="https://kontact.kde.org/"
pkgdesc="KMail account wizard"
license="GPL-2.0-or-later AND LGPL-2.0-or-later AND GFDL-1.2-only"
makedepends="extra-cmake-modules qt5-qtbase-dev qt5-qttools-static kwallet-dev kcmutils-dev knotifyconfig-dev kconfig-dev kservice-dev kdbusaddons-dev kdoctools-dev ktexteditor-dev kcodecs-dev kcrash-dev knotifications-dev akonadi-dev kidentitymanagement-dev kldap-dev kmailtransport-dev pimcommon-dev libkdepim-dev libkleo-dev kimap-dev akonadi-mime-dev kross-dev knewstuff-dev gpgme-dev shared-mime-info"
source="https://download.kde.org/stable/release-service/$pkgver/src/kmail-account-wizard-$pkgver.tar.xz"
subpackages="$pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="71a305dcf51fe20d700c181f0a13981bae243e2a3d9080e58cc4ec24a1adc625f500936656b732fd419cfbfef9258af1ace45789c7756687a22788fc5d9da296  kmail-account-wizard-20.04.3.tar.xz"
